<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;

class IndexController extends Controller
{
    public function index()
    {
        try{

            $chose = DB::table('filed')->get();

            return view('Admin.index')->with('results',$chose);

        }catch (Exception $e){

            $info =  $e->getMessage().'failed line:'.$e->getLine().'failed string:'.$e->getTraceAsString();
            return json_encode(['msg'=>0,'data' => $info]);
            exit;
        }
    }
    //



}
